﻿/*
后期部署脚本模板							
--------------------------------------------------------------------------------------
 此文件包含将附加到生成脚本中的 SQL 语句。		
 使用 SQLCMD 语法将文件包含到后期部署脚本中。			
 示例:      :r .\myfile.sql								
 使用 SQLCMD 语法引用后期部署脚本中的变量。		
 示例:      :setvar TableName MyTable							
               SELECT * FROM [$(TableName)]					
--------------------------------------------------------------------------------------
*/
delete from ASMS_Seed;
insert into [ASMS_Seed] ([Key],[Value]) values ('10', 1000000000)
insert into [ASMS_Seed] ([Key],[Value]) values ('11', 1000000000)
insert into [ASMS_Seed] ([Key],[Value]) values ('12', 1000000000)
insert into [ASMS_Seed] ([Key],[Value]) values ('13', 1000000000)
insert into [ASMS_Seed] ([Key],[Value]) values ('14', 1000000000)
insert into [ASMS_Seed] ([Key],[Value]) values ('15', 1000000000)
insert into [ASMS_Seed] ([Key],[Value]) values ('16', 1000000000)
insert into [ASMS_Seed] ([Key],[Value]) values ('17', 1000000000)
insert into [ASMS_Seed] ([Key],[Value]) values ('18', 1000000000)
insert into [ASMS_Seed] ([Key],[Value]) values ('19', 1000000000)
insert into [ASMS_Seed] ([Key],[Value]) values ('20', 1000000000)
insert into [ASMS_Seed] ([Key],[Value]) values ('21', 1000000000)
insert into [ASMS_Seed] ([Key],[Value]) values ('SPR', 1000)
insert into [ASMS_Seed] ([Key],[Value]) values ('SRI', 1000)
insert into [ASMS_Seed] ([Key],[Value]) values ('MTR', 1000)
insert into [ASMS_Seed] ([Key],[Value]) values ('AUTO', 1000)
insert into [ASMS_Seed] ([Key],[Value]) values ('CTR', 1000)

delete from ASMS_Business;
delete from ASMS_Station;
delete from ASMS_Staff;
delete from ASMS_StaffPosition;

-- 商家
insert into ASMS_Business ([Id], [Number], [Name], [ShortName],[Status],[CreatedTime],[Creator]) values (
'{647AE906-43F8-447B-A7AB-90DCD09E41CC}',
'B0001',
'测试商家',
'测试商家',
1,
'2016-07-04',
'administrator');

-- 店铺
insert into ASMS_Station ([Id],[BusinessId], [Number], [Name], [Telephone],[Status],[CreatedTime],[Creator]) values (
'{0EB976A2-5A5A-4E67-A434-CD0E70E69AEA}',
'{647AE906-43F8-447B-A7AB-90DCD09E41CC}',
'B0001S0001',
'测试店铺',
'0531-10000',
1,
'2016-07-04',
'administrator');

-- 员工
insert into ASMS_Staff ([Id],[BusinessId],[Name],[Account],[IdNumber],[Password],[Telephone],[Status],[Pinyin],[Letter],[CreatedTime],[Creator]) values (
'{38B05A34-E58B-4612-876F-E2324A8F28C2}',
null,
'东师傅',
'dong',
'123456789004000',
'123456',
'13000000005',
1,
'DONGSHIFU',
'D',
'2016-07-04',
'administrator');
insert into ASMS_Staff ([Id],[BusinessId],[Name],[Account],[IdNumber],[Password],[Telephone],[Status],[Pinyin],[Letter],[CreatedTime],[Creator]) values (
'{D965145E-D55A-4BC0-BA0B-1531C799DF0C}',
'{647AE906-43F8-447B-A7AB-90DCD09E41CC}',
'李师傅',
'Lee',
'123456789000000',
'123456',
'13000000001',
1,
'LISHIFU',
'LSF',
'2016-07-04',
'administrator');
insert into ASMS_Staff ([Id],[BusinessId],[Name],[Account],[IdNumber],[Password],[Telephone],[Status],[Pinyin],[Letter],[CreatedTime],[Creator]) values (
'{ACEBFE4D-F8D6-4976-B38B-ACDC6D66AEC9}',
'{647AE906-43F8-447B-A7AB-90DCD09E41CC}',
'王师傅',
'wang',
'123456799000000',
'123456',
'13000000002',
1,
'WANGSHIFU',
'WSF',
'2016-07-04',
'administrator');

insert into ASMS_StaffPosition ([StaffId],[StationId],[Post],[Status],[CreatedTime],[Creator]) values (
'{D965145E-D55A-4BC0-BA0B-1531C799DF0C}',
'{0EB976A2-5A5A-4E67-A434-CD0E70E69AEA}',
'P01',
1,
'2016-07-04',
'administrator');

insert into ASMS_StaffPosition ([StaffId],[StationId],[Post],[Status],[CreatedTime],[Creator]) values (
'{D965145E-D55A-4BC0-BA0B-1531C799DF0C}',
'{0EB976A2-5A5A-4E67-A434-CD0E70E69AEA}',
'P02',
1,
'2016-07-04',
'administrator');

insert into ASMS_StaffPosition ([StaffId],[StationId],[Post],[Status],[CreatedTime],[Creator]) values (
'{ACEBFE4D-F8D6-4976-B38B-ACDC6D66AEC9}',
'{0EB976A2-5A5A-4E67-A434-CD0E70E69AEA}',
'P02',
1,
'2016-07-04',
'administrator');

insert into ASMS_StaffPosition ([StaffId],[StationId],[Post],[Status],[CreatedTime],[Creator]) values (
'{ACEBFE4D-F8D6-4976-B38B-ACDC6D66AEC9}',
'{0EB976A2-5A5A-4E67-A434-CD0E70E69AEA}',
'P01',
1,
'2016-07-04',
'administrator');

-- 充值项
insert into asms_rechargeitem ([Id],[Code],[Name],[Price],[Amount],[Status],[CreatedTime],[Creator])
values ('{A22A169B-2000-4661-99D7-AB884B9E447B}','RI01','普通礼包', 100, 150, 1, '2016-07-01','admin')
insert into asms_rechargeitem ([Id],[Code],[Name],[Price],[Amount],[Status],[CreatedTime],[Creator])
values ('{E0DC33F3-A4A0-4DD5-97B5-F73303B7AB57}','RI02','黄金礼包', 1000, 1500, 1, '2016-07-01','admin')
insert into asms_rechargeitem ([Id],[Code],[Name],[Price],[Amount],[Status],[CreatedTime],[Creator])
values ('{189CFD6D-AD1D-4F79-BD26-F4F0E7C4E344}','RI03','钻石礼包', 10000, 15000, 1, '2016-07-01','admin')

insert into ASMS_SalePrice([TargetId],[TargetType],[Channel],[Price],[Status],[Creator],[CreatedTime])
values ('{A22A169B-2000-4661-99D7-AB884B9E447B}',2,1,100,1,'system','2016-7-1')
insert into ASMS_SalePrice([TargetId],[TargetType],[Channel],[Price],[Status],[Creator],[CreatedTime])
values ('{A22A169B-2000-4661-99D7-AB884B9E447B}',2,2,90,1,'system','2016-7-1')
insert into ASMS_SalePrice([TargetId],[TargetType],[Channel],[Price],[Status],[Creator],[CreatedTime])
values ('{E0DC33F3-A4A0-4DD5-97B5-F73303B7AB57}',2,1,1500,1,'system','2016-7-1')
insert into ASMS_SalePrice([TargetId],[TargetType],[Channel],[Price],[Status],[Creator],[CreatedTime])
values ('{E0DC33F3-A4A0-4DD5-97B5-F73303B7AB57}',2,2,1450,1,'system','2016-7-1')
insert into ASMS_SalePrice([TargetId],[TargetType],[Channel],[Price],[Status],[Creator],[CreatedTime])
values ('{189CFD6D-AD1D-4F79-BD26-F4F0E7C4E344}',2,1,15000,1,'system','2016-7-1')
insert into ASMS_SalePrice([TargetId],[TargetType],[Channel],[Price],[Status],[Creator],[CreatedTime])
values ('{189CFD6D-AD1D-4F79-BD26-F4F0E7C4E344}',2,2,14500,1,'system','2016-7-1')

-- 套餐
insert into ASMS_Package([Id],
	[Code],
	[Name],
	[StartSaleTime],
	[StopSaleTime],
	[ExpiringDate],
	[Duration],
	[DurationType],
	[Price],
	[MarketPrice],
	[PackageAccessibility],
	[CreatedTime],
	[Creator],
	[Status])values ('{6BF68B83-D326-400C-B719-6B6A03840CCB}',
	'PKGT0001',
	'套餐100',
	'2016-7-1',
	'2019-7-1',
	'2020-1-1',
	30,
	1,
	100,
	150,
	1,
	'2017-6-1',
	'system',
	1);
insert into ASMS_PackageItem ([Id],[PackageId],[Name],[Type],[Value],[MarketPrice],[TagDataType],[TagData])
values ('{49FC9E99-0715-4C0A-9DE8-FC9B6DF3B5BC}','{6BF68B83-D326-400C-B719-6B6A03840CCB}','更换轮胎',1,10,100,1,'E5406FFE-F1B4-42FA-9A7B-5A5A67E335F1')
insert into ASMS_PackageItem ([Id],[PackageId],[Name],[Type],[Value],[MarketPrice],[TagDataType],[TagData])
values ('{66EDBEE6-9A91-4F46-B7FF-8248D3E859DB}','{6BF68B83-D326-400C-B719-6B6A03840CCB}','券50',2,50,50,null,null)

insert into ASMS_Package([Id],
	[Code],
	[Name],
	[StartSaleTime],
	[StopSaleTime],
	[ExpiringDate],
	[Duration],
	[DurationType],
	[Price],
	[MarketPrice],
	[PackageAccessibility],
	[CreatedTime],
	[Creator],
	[Status])values ('{9622EBD0-C867-4F47-9F59-07310D685968}',
	'PKGT0002',
	'套餐200',
	'2016-7-1',
	'2019-7-1',
	'2020-1-1',
	30,
	1,
	200,
	300,
	1,
	'2017-6-1',
	'system',
	1);
insert into ASMS_PackageItem ([Id],[PackageId],[Name],[Type],[Value],[MarketPrice],[TagDataType],[TagData])
values ('{1286BE98-FE0F-4C10-B6CE-E10707B6EA53}','{9622EBD0-C867-4F47-9F59-07310D685968}','更换轮胎',1,10,100,1,'E5406FFE-F1B4-42FA-9A7B-5A5A67E335F1')
insert into ASMS_PackageItem ([Id],[PackageId],[Name],[Type],[Value],[MarketPrice],[TagDataType],[TagData])
values ('{BA9E0F7C-89E2-4CCD-BF44-366ED5911A38}','{9622EBD0-C867-4F47-9F59-07310D685968}','冷却系统免拆清洗',1,10,100,1,'D976F870-08AD-4435-BA06-054D7CF0ECB1')
insert into ASMS_PackageItem ([Id],[PackageId],[Name],[Type],[Value],[MarketPrice],[TagDataType],[TagData])
values ('{E21AD6E7-4D4B-45CD-9770-7863C962D7A4}','{9622EBD0-C867-4F47-9F59-07310D685968}','券50',2,100,100,null,null)

insert into ASMS_Package([Id],
	[Code],
	[Name],
	[StartSaleTime],
	[StopSaleTime],
	[ExpiringDate],
	[Duration],
	[DurationType],
	[Price],
	[MarketPrice],
	[PackageAccessibility],
	[CreatedTime],
	[Creator],
	[Status])values ('{F7F13950-4540-427B-A0D7-49326187391A}',
	'PKGT0003',
	'套餐300',
	'2016-7-1',
	'2019-7-1',
	'2020-1-1',
	30,
	1,
	300,
	400,
	1,
	'2017-6-1',
	'system',
	1);
insert into ASMS_PackageItem ([Id],[PackageId],[Name],[Type],[Value],[MarketPrice],[TagDataType],[TagData])
values ('{074AAB18-9ED1-4E00-8655-226957CD9445}','{F7F13950-4540-427B-A0D7-49326187391A}','更换轮胎',1,10,100,1,'E5406FFE-F1B4-42FA-9A7B-5A5A67E335F1')
insert into ASMS_PackageItem ([Id],[PackageId],[Name],[Type],[Value],[MarketPrice],[TagDataType],[TagData])
values ('{6703D5E0-C727-4467-A412-8581C7BF3C7B}','{F7F13950-4540-427B-A0D7-49326187391A}','冷却系统免拆清洗',1,10,100,1,'D976F870-08AD-4435-BA06-054D7CF0ECB1')
insert into ASMS_PackageItem ([Id],[PackageId],[Name],[Type],[Value],[MarketPrice],[TagDataType],[TagData])
values ('{EF525DCD-2053-41BE-953B-25491A3F8116}','{F7F13950-4540-427B-A0D7-49326187391A}','更换雨刮',1,10,100,1,'7AD2D4E8-B98B-4275-A9B3-2D97148694A9')
insert into ASMS_PackageItem ([Id],[PackageId],[Name],[Type],[Value],[MarketPrice],[TagDataType],[TagData])
values ('{2EF32213-BE9F-419B-A9DD-1A32633C5715}','{F7F13950-4540-427B-A0D7-49326187391A}','券50',2,100,100,null,null)


insert into ASMS_SalePrice([TargetId],[TargetType],[Channel],[Price],[Status],[Creator],[CreatedTime])
values ('{6BF68B83-D326-400C-B719-6B6A03840CCB}',1,1,100,1,'system','2016-7-1')
insert into ASMS_SalePrice([TargetId],[TargetType],[Channel],[Price],[Status],[Creator],[CreatedTime])
values ('{6BF68B83-D326-400C-B719-6B6A03840CCB}',1,2,90,1,'system','2016-7-1')
insert into ASMS_SalePrice([TargetId],[TargetType],[Channel],[Price],[Status],[Creator],[CreatedTime])
values ('{9622EBD0-C867-4F47-9F59-07310D685968}',1,1,200,1,'system','2016-7-1')
insert into ASMS_SalePrice([TargetId],[TargetType],[Channel],[Price],[Status],[Creator],[CreatedTime])
values ('{9622EBD0-C867-4F47-9F59-07310D685968}',1,2,190,1,'system','2016-7-1')
insert into ASMS_SalePrice([TargetId],[TargetType],[Channel],[Price],[Status],[Creator],[CreatedTime])
values ('{F7F13950-4540-427B-A0D7-49326187391A}',1,1,300,1,'system','2016-7-1')
insert into ASMS_SalePrice([TargetId],[TargetType],[Channel],[Price],[Status],[Creator],[CreatedTime])
values ('{F7F13950-4540-427B-A0D7-49326187391A}',1,2,290,1,'system','2016-7-1')

-- 其他服务项目
insert into ASMS_PayItem ([Id],[Code],[Name],[Type],[Amount],[Status],[CreatedTime],[Creator])
values ('{93B7D029-D01E-4E16-8E2E-4427CCAE3C85}','PAYI0001', '付费50', 1, 50,1, '2016-7-1','system')
insert into ASMS_PayItem ([Id],[Code],[Name],[Type],[Amount],[Status],[CreatedTime],[Creator])
values ('{96A6D7F2-8837-4A9E-A901-CDF27895E3CF}','PAYI0002', '付费100', 1, 100,1, '2016-7-1','system')
insert into ASMS_PayItem ([Id],[Code],[Name],[Type],[Amount],[Status],[CreatedTime],[Creator])
values ('{C7390700-AC03-46BD-8133-D702D4F1626C}','PAYI0003', '付费200', 1, 200,1, '2016-7-1','system')
insert into ASMS_PayItem ([Id],[Code],[Name],[Type],[Amount],[Status],[CreatedTime],[Creator])
values ('{198CEE70-EDBE-49C0-80D8-9F1AF802060C}','PAYI0004', '优惠50', 2, 50,1, '2016-7-1','system')
insert into ASMS_PayItem ([Id],[Code],[Name],[Type],[Amount],[Status],[CreatedTime],[Creator])
values ('{82372FD0-5985-4CC4-9CCA-27FBE90A5EB9}','PAYI0005', '优惠100', 2, 100,1, '2016-7-1','system')
insert into ASMS_PayItem ([Id],[Code],[Name],[Type],[Amount],[Status],[CreatedTime],[Creator])
values ('{6D940260-070D-4AE2-BA04-57214693264A}','PAYI0006', '优惠200', 2, 200,1, '2016-7-1','system')